//
//  Bussiness.m
//  BIUT
//
//  Created by lvfeijun on 2019/7/26.
//  Copyright © 2019年 通证控股. All rights reserved.
//

#import "Bussiness.h"

@implementation Bussiness

/*************获取钱包列表*************/
+(NSMutableArray *)getWalletList{
    NSString* path = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES).firstObject stringByAppendingPathComponent:@"walletList"];
    NSData* data = [NSData dataWithContentsOfFile:path];
    NSKeyedUnarchiver* unarchiver = [[NSKeyedUnarchiver alloc]initForReadingWithData:data];
    NSMutableArray *array = [unarchiver decodeObjectForKey:@"walletList"];
    [unarchiver finishDecoding];
    return array;
}

+(NSString *)getTypeURL:(NSString *)name{
    lvfjLog(@"%@",name);
    return [name isEqualToString:@"BIU"]?BaseServerUrl:biutUrl;
}

+(NSString *)getCurrentDate
{
    NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
    [dateFormatter setDateFormat:@"YYYY-MM-dd hh:mm:ss"];
    NSString *dateString = [dateFormatter stringFromDate:[NSDate date]];
    return dateString;
}

@end
